/*
 * FinishField.java
 *
 * Created on 2007. március 12., 16:50
 *
 */

package laborhazi;

/**
 * The goal, that the lemmings must reach, stores the scores
 * @author nyuszik
 */
public class FinishField extends FieldElement{
    
    private int Score = 0;
    private Field putTo;
    
    /** Creates a new instance of FinishField */
    public FinishField(Field stage) {
    	putTo = stage;
    	position = new int[2];
    }
    /** */
    public FinishField(int a, Field stage) { // silent testing
    	putTo = stage;
    	position = new int[2];
    }
    public String toString() {
    	return("finishField: ");
    }
    /** 
     * Increases the score
     */
    public void increase() {
        System.out.println("entered finishfield");
        ++Score;
        /*
        if (1 == putTo.getLemmingNum()) {
        	putTo.viewer.game.end();//TODO print Highscore and wait EXIT
        }*/
        
    }
    /** 
     * Gets the score stored in the FinishField
     * @return the score
     */
    public int getScore() {
        return Score;
    }
    public void setPos(int[] poss) {
    	position[0] = poss[0];
     	position[1] = poss[1];
     }
    
}
